﻿@model Scrumrun.Models.UserStory

@{
    ViewBag.Title = "Edit";
}

<h3>@Model.Project.Name</h3>
<h4>Edit userstory</h4>

@using (Html.BeginForm("Edit", "Backlog", FormMethod.Post, new { @Class = "form-horizontal" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>UserStory</legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.Project_ProjectId)
        @Html.HiddenFor(model => model.BackLogPriority)
        @Html.HiddenFor(model => model.CompletedDate)

        <div class="control-group">
            @Html.LabelFor(model => model.Title, new { @Class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>  
        </div>

@*        <div class="control-group">
            @Html.LabelFor(model => model.BackLogPriority, new { @Class = "control-label" })
            <div class="controls">
            @Html.EditorFor(model => model.BackLogPriority)
            @Html.ValidationMessageFor(model => model.BackLogPriority)
            </div>
        </div>*@

        <div class="control-group">
            @Html.LabelFor(model => model.Effort, new { @Class = "control-label" })
            <div class="controls">
            @Html.EditorFor(model => model.Effort) (Effort can be 1 to 10.)
            @Html.ValidationMessageFor(model => model.Effort)
            </div>
        </div>

@*        <div class="control-group">
            @Html.LabelFor(model => model.UserId, new { @Class = "control-label" })
            <div class="controls">
            @Html.EditorFor(model => model.UserId)
            @Html.ValidationMessageFor(model => model.UserId)
            </div>
        </div>*@

        <div class="control-group">
            @Html.LabelFor(model => model.UserProfile_UserId, "User", new { @Class = "control-label" })

            <div class="controls">
            @Html.DropDownList("UserProfile_UserId",String.Empty)
            @Html.ValidationMessageFor(model => model.UserProfile_UserId)
            </div>
        </div>

@*        <div class="control-group">
            @Html.LabelFor(model => model.Project_ProjectId, "Project", new { @Class = "control-label" })
            <div class="controls">
            @Html.DropDownList("ProjectProjectId", String.Empty)
            @Html.ValidationMessageFor(model => model.Project_ProjectId)
            </div>
        </div>*@

        <div class="control-group">
            @Html.LabelFor(model => model.ItemStatus_ItemStatusId, "ItemStatus", new { @Class = "control-label" })

            <div class="controls">
            @Html.DropDownList("ItemStatus_ItemStatusId")
            @Html.ValidationMessageFor(model => model.ItemStatus_ItemStatusId)
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Sprint_SprintId, "Sprint", new { @Class = "control-label" })
            <div class="controls">
            @Html.DropDownList("Sprint_SprintId", String.Empty)
            @Html.ValidationMessageFor(model => model.Sprint_SprintId)
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
                <input type="submit" value="Save" class="btn btn-warning"/>
            </div>
        </div>

    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index", new { ProjectId = Model.Project_ProjectId }, new {@Class="btn"})
</div>

@section Scripts {
   
}
